﻿<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="UserViewApplications.aspx.cs"
    Inherits="WebAppAuthAdmin.App.UserViewApplications" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <br />
    <div class="editionContainerFilter">
        <p>
            <span class="title">User Name:</span>
            <asp:Label ID="txtUserName" runat="server" Text="" CssClass="txtLbl"></asp:Label>
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title">Nombre:</span>
             <asp:TextBox ID="txtNombreUsuario" runat="server" CssClass="inputs inputlong" ClientIDMode="Static"></asp:TextBox>
            
        </p>
        <div class="clear">
        </div>
         <p>
            <span class="title">Usa Password Local?:</span>     
             <asp:CheckBox ID="chkPasswordLocal" runat="server" Enabled="false" />
        </p>
        <div class="clear">
        </div>
    </div>
    <br />
    <h2>
        <asp:Image Width="15px" Height="15px" ID="imgExpandResults" CssClass="imgExpand"
            ImageUrl="/Images/icon_blockexpanded.png" runat="server" ClientIDMode="Static"
            alt="" onclick="window.AppCommonObj.toggleVisibility(this.id, 'divResult');" />
       Aplicaciones
    </h2>
    <div class="editionContainerForGrid" id="divResult">
        <asp:GridView ID="GridUserApplication" runat="server" CellPadding="4" ForeColor="#333333"
            GridLines="None" AutoGenerateColumns="False" DataKeyNames="Id" OnRowCommand="GridUserApplication_RowCommand"
             OnRowDataBound="GridUserApplication_RowDataBound" Width="100%">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <%--<asp:ButtonField ButtonType="Image" CommandName="editar" ImageUrl="~/Images/editar.png"
                    Text="Roles" AccessibleHeaderText="editar" ShowHeader="True">
                    <HeaderStyle HorizontalAlign="Left" Width="30px" />                    
                    <ItemStyle HorizontalAlign="Center" />
                </asp:ButtonField>   --%>             
                <%--<asp:ButtonField ButtonType="Image" CommandName="incluir" ImageUrl="~/Images/editar.png"
                    Text="Incluir" AccessibleHeaderText="editar" ShowHeader="True">
                    <HeaderStyle HorizontalAlign="Left" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:ButtonField>                
                <asp:ButtonField ButtonType="Image" CommandName="bloquear" ImageUrl="~/Images/editar.png"
                    Text="Bloquear" AccessibleHeaderText="editar" ShowHeader="True">
                    <HeaderStyle HorizontalAlign="Left" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:ButtonField>           --%>     
                <asp:BoundField DataField="Name" HeaderText="Nombre">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Incluido?">
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" />
                    <HeaderTemplate>
                        <asp:Label ID="Label1" runat="server" Text="Incluido?"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkSelectRowIncluido" runat="server"  />
                        <asp:LinkButton ID="lnkRowIncluir" runat="server" CommandName="incluir"  CssClass="lnkGrid"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="Bloqueado">
                    <HeaderStyle HorizontalAlign="Left"  />
                    <ItemStyle HorizontalAlign="Left" />
                    <HeaderTemplate>
                        <asp:Label ID="Label1" runat="server" Text="Bloqueado?"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkSelectRowBloqueado" runat="server"  />
                        <asp:LinkButton ID="lnkRowBloquear" runat="server" CommandName="bloquear"  CssClass="lnkGrid"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="Permisos">
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" />
                    <HeaderTemplate>
                        <asp:Label ID="Label1" runat="server" Text="Permisos"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>                        
                        <asp:LinkButton ID="lnkRowPermisos" runat="server" CommandName="permisos"  CssClass="lnkGrid">Permisos</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
               <%-- <asp:CheckBoxField DataField="IsIncluded" HeaderText="Incluido?">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:CheckBoxField>--%>
                <%--<asp:CheckBoxField DataField="IsUserBlocked" HeaderText="Bloqueado">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:CheckBoxField>--%>               
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#4b6c9e" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </div>
    <br />
      <asp:LinkButton ID="lnkGuardar" runat="server" OnClick="lnkGuardar_Click" CssClass="guardar">Guardar</asp:LinkButton>
     <script type='text/javascript'>

         $(document).ready(function () {

             if (!window.AppCommonObj) {
                 window.AppCommonObj = new AppCommon();
             }

             $('.chkSelectRowHeader').change(function () {
                 window.AppCommonObj.ToggleSelectAllRows();
             });
                        
         });
    </script>

</asp:Content>
